home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Communication / NewsBase / Source / IUifNode.m < prev    next >
Text File  |  1993-01-12  |  2KB  |  119 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "IUifNode.h"
  5. #import <stdio.h>
  6. #import <objc/hashtable.h>
  7. #import <libc.h>
  8.  
  9. @implementation IUifNode
  10.  
  11. - init
  12. {
  13.     [super init];
  14.     iActiveFlag = YES;
  15.     iLeafFlag = NO;
  16.     iLinkedData = nil;
  17.     iType = UnDefined;
  18.     iImageTitle = nil;
  19.     return self;
  20. }
  21.  
  22. - (char *)titleForCell
  23. {
  24.     return iStringTitle;
  25. }
  26.  
  27. - setTitleForCell:(const char *)title
  28. {
  29.     sprintf(iStringTitle, "%.255s", title);
  30.     return self;
  31. }
  32.  
  33. - imageForCell
  34. {
  35.     return iImageTitle;
  36. }
  37.  
  38. - setImageForCell:image
  39. {
  40.     iImageTitle = image;
  41.     return self;
  42. }
  43.  
  44. - (BOOL)active
  45. {
  46.     return iActiveFlag;
  47. }
  48.  
  49. - setActive:(BOOL)flag
  50. {
  51.     iActiveFlag = flag;
  52.     return self;
  53. }
  54.  
  55. - (BOOL)isLeaf;
  56. {
  57.     return iLeafFlag;
  58. }
  59.  
  60. - setLeaf:(BOOL)flag
  61. {
  62.     iLeafFlag = flag;
  63.     return self;
  64. }
  65.  
  66. - setLinkedData:data nodeType:(NodeType)type
  67. {
  68.     [self setLinkedData:data];
  69.     [self setNodeType:type];
  70.     return self;
  71. }
  72.  
  73. - linkedData
  74. {
  75.     return iLinkedData;
  76. }
  77.  
  78. - setLinkedData:data
  79. {
  80.     iLinkedData = data;
  81.     return self;
  82. }
  83.  
  84. - setNodeType:(NodeType)type
  85. {
  86.     iType = type;
  87.     return self;
  88. }
  89.  
  90. - (NodeType)nodeType
  91. {
  92.     return iType;
  93. }
  94.  
  95. - setDataGroupName:(const char *)groupname
  96. {
  97. //    strncpy (iDataGroupName, groupname, (sizeof(iDataGroupName)-1));
  98.     if (groupname == NULL) {
  99.     fprintf(stderr,"IUifNode:error:pointer of \"groupname\" is NULL\n");
  100.     return 0;
  101.     }
  102.     iDataGroupName = NXCopyStringBufferFromZone(groupname, [self zone]);
  103.     return self;
  104. }
  105.  
  106. - (const char *)dataGroupName
  107. {
  108.     return iDataGroupName;
  109. }
  110.  
  111. - free
  112. {
  113.     free(iDataGroupName);
  114.     [super free];
  115.     return nil;
  116. }
  117.  
  118. @end
  119.